//
//  flashOneModel.m
//  CarsHome
//
//  Created by dapeng on 15/12/2.
//  Copyright © 2015年 dapeng. All rights reserved.
//

#import "flashOneModel.h"
#import "flashTwoModel.h"
@implementation flashOneModel
- (void)dealloc {
    
    [_listArray release];
    [super dealloc];
}
- (instancetype)initWithDataSource:(NSDictionary *)data {
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:data];
    }
    return self;
}


- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
        if ([key isEqualToString:@"list"]) {
        NSArray *array = value;
        NSMutableArray *mutableArray = [[NSMutableArray alloc] init];
        for (NSDictionary *dic in array) {
            flashTwoModel *twoModel = [[flashTwoModel alloc] initWithDataSource:dic];
            [mutableArray addObject:twoModel];
        }self.listArray = [NSMutableArray arrayWithArray:mutableArray];
    }
}
- (id)valueForUndefinedKey:(NSString *)key {
    return nil;
}

@end
